<template>
    <div>
        <a-modal
            :title="currentData.fsxmc"
            v-model:visible="visible"
            width="100%"
            wrapClassName="technicalReview-materialComparison-box"
            :maskClosable="false"
            :destroyOnClose="true"
            :forceRender="true"
            :footer="null"
        >
            <div class="reviewVerificationManage-allHandlingPage-modal-v" style="height: calc(100vh - 66px);">
                <div class="top-handle-v">
                    <div style="font-weight: 600;font-family: KaiTi !important;color: #38f;display: flex;align-items: center;">
                        <!-- {{ currentData.fhjmc }} -->
                        <div>
                            <span style="display: inline-block;border:2px solid #ff9200;padding: 0 5px;border-radius: 17.3px;color: #ff9200;margin-right: 10px;font-size: 18px;">材料对比</span>
                            <span>{{ currentData.fqymc }}</span>
                        </div>
                        <span v-if="currentData.fslbh" style="display: inline-block;border:2px solid #4eef66;padding: 0 5px;border-radius: 17.3px;color: #4eef66;margin-left: 10px;font-size: 14px;">{{ currentData.fslbh }}</span>
                    </div>
                    <div style="display: flex;align-items: center;">
                        <a-button class="blue-btn" type="primary" @click="refreshClick()" icon="reload">刷新</a-button>
                        <!-- <a-button style="margin-left: 10px;" @click="returnClick()" icon="close"></a-button> -->
                    </div>
                </div>
                <!-- <div style="height: 53px;"></div> -->
                <div style="margin-top: 8px;">
                    <materialReviewMaterialComparison :key="materialReviewMaterialComparisonKey" ref="materialReviewMaterialComparisonRef" @modifySuccess="modifySuccess"/>
                </div>
            </div>
        </a-modal>
    </div>
</template>
<script>
import materialReviewMaterialComparison from '../materialReview/materialComparison.vue'
export default {
    components:{
        materialReviewMaterialComparison,
    },
    props:{

    },
    data(){
        return{
            visible:false,
            currentData:{},
            materialReviewMaterialComparisonKey:null,
        }
    },
    watch:{

    },
    mounted(){
        
    },
    methods:{
        getData(row){
            this.currentData = row
            this.$nextTick(()=>{
                setTimeout(()=>{
                    this.$refs.materialReviewMaterialComparisonRef.getData({...row,sqsxid:row.sqsxid,isTopTabs:true,isActiveKey:'材料对比',reserveBottom:30,isRefresh:true,fhjmc:row.fhjmc})
                },200)
            })
        },
        //关闭
        returnClick(){
            this.visible = false
        },
        //刷出新
        refreshClick(){
            this.$refs.materialReviewMaterialComparisonRef.getData({...this.currentData,sqsxid:this.currentData.sqsxid,isTopTabs:true,isActiveKey:'材料对比',reserveBottom:30,fhjmc:this.currentData.fhjmc})
        },
        modifySuccess(){
            //console.log('我在刷新了1')
            this.$emit('modifySuccess')
        }
    }
}
</script>
<style lang="less">
.technicalReview-materialComparison-box{

    .top-handle-v{
        display: flex;
        justify-content: space-between;
    }
    .ant-modal {
        top:0;
    }
    .ant-modal-body{
        padding: 0;
        background-color: #f0f2f5;
    }
    .ant-modal-content{
        height: calc(100vh - 24px);
        box-shadow: none;
    }
}
</style>